1 <!-- begin tim kiem-->
2 <form name=
"form_select" method="GET" action="./">
3 <table id=
"timkiem_home" border="0" id="table21" cellspacing="0" cellpadding="0">
4                     <tr>
5                         <td style=
"padding-left:4px;">
6                         <
select name="cat_id">
7                         <option
value="" selected>Chọn danh mục</option>
8                         <? $timkiem=mysql_query(
"SELECT * FROM cat order by thutu desc");
9                         
while($row_timkiem=mysql_fetch_array($timkiem))
10                         {?>
11                         <option
value="<? echo $row_timkiem['id'];?>"><? echo $row_timkiem['name'];?></option>
12                         <?}?>
13                         </
select>
14   </td>
15   <td style=
"padding-left:4px;">
16                         <
select name="level">
17                         <option
value="">-- Chọn tất cả --</option>
18                         <option
value="0">Shop Vip</option>
19                         <option
value="3">Shop miễn phí</option>
20                         <option
value="1">Shop chờ kích hoạt</option>
21                         <option
value="2">Thành viên mua bán</option>
22                         </
select>
23   </td>
24 <td style=
"padding-left:0px">
25 <input name=
"keywords" type="text" id="input_timkiem" value="">
26 </td>
27 <td>
28 <input type=
"hidden" name="act" value="search">
29 <input type=
"hidden" name="index" value="search">
30 <input id=
"button_search" type="submit" name="search" value="Tìm">
31 </td>
32 </tr>
33 </table>
34 </form>
35 <!-- end tim kiem -->
36 <?

37 if
(isset($_REQUEST['act']))
38 {
39 ?><br>
40 <TABLE cellSpacing=
0 cellPadding=0 width="100%" id="table35" style="line-height: 100%; font-size:11px; text-align: justify; border:1px solid #C0C0C0; border-bottom:0px">
41 <tr><td>
42 <table>
43 <tr bgcolor=
"#ADB3AE" height="40">
44 <td align=
"left" class="title" width="115" style="padding-left:5px"><font color="#FFFFFF"><b>Logo</b></font></td>
45 <td align=
"left" class="title" width="210"><font color="#FFFFFF"><b>Tên công ty/USER</b></font></td>
46 <td align=
"left" class="title" width="210">
47     <font color=
"#FFFFFF"><b>&nbsp;&nbsp; Địa chỉ</b></font></td>
48     <td align=
"left" width="142" class="title">
49     <font color=
"#FFFFFF"><b>Liên hệ</b></font></td>
50     <td align=
"left" class="title" width="127">
51     <font color=
"#FFFFFF"><b>Cấp độ</b></font></td>
52     <td align=
"left" class="title" width="55">
53     <font color=
"#FFFFFF"><b>TT Top</b></font></td>
54     <td align=
"left" class="title" width="55">
55     <font color=
"#FFFFFF"><b>TT CAT</b></font></td>
56     <td align=
"left" class="title" width="95">
57     Chức năng
58     </td>
59     </tr>
60 </table>
61     </td>
62     </tr>
63 <?
64     $
where="1=1";
65     $keywords=killInjection($_REQUEST[
'keywords']);
66     
if ($keywords!='')
67     {
68         $
where.=" and (mieuta like '%".$keywords."%' or title like '%".$keywords."%'";
69         
if ($_REQUEST['search_in_description']=='')
70             $
where.="or user like '%".$keywords."%' or company like '%".$keywords."%' or address like '%".$keywords."%' ";
71         $
where.=") ";
72     }
73     
if ($_REQUEST['id']!='') $where.=" and id=".$_REQUEST['id'];
74     
if ($_REQUEST['cat_id']!='') $where.=" and cat_mem=".$_REQUEST['cat_id'];
75     
if ($_REQUEST['level']!='') $where.=" and level_shop=".$_REQUEST['level'];
76     
if ($_REQUEST['manufacturers_id']!='') $where.=" and providers_id=".$_REQUEST['manufacturers_id'];
77     
if ($_REQUEST['pfrom']!='') $where.=" and products_price>=".$_REQUEST['pfrom'];
78     
if ($_REQUEST['pto']!='') $where.=" and products_price<=".$_REQUEST['pto'];
79     
if ($_REQUEST['dfrom']!='') $where.=" and products_date_added>=".$_REQUEST['dfrom'];
80     
if ($_REQUEST['dto']!='') $where.=" and products_date_added<=".$_REQUEST['dto'];
81     
82     $MAXPAGE=
11;
83     $p=
0;
84     
if ($_REQUEST['p']!='') $p=$_REQUEST['p'];
85     
86     $result = mysql_query(
"select count(*) from user_shop where $where",$con);
87     $total=mysql_fetch_row($result);
88
89     $sql=
"select * from user_shop where $where limit ".$p*$MAXPAGE.",".$MAXPAGE;
90     $result = mysql_query($sql,$con);
91     
while (($row=mysql_fetch_assoc($result)))
92     {
93         ?>
94         <tr><td colspan=
"6" style="padding-top:5px; padding-bottom:0px">
95         <TABLE cellSpacing=
0 cellPadding=0 width="100%" id="table35" style="line-height: 120%;font-size:11px; text-align: justify; border-bottom:1px solid #C0C0C0; padding:5px;">
96         <tr>
97         <td align=
"left" valign="top" width="120" style="border-right:1px solid #C0C0C0">
98         <a href=
"../<? echo $row['user'];?>" target="_blank"><IMG width="110" src="../<? echo $row['logo'];?>"></a></td>
99         <td align=
"left" valign="top" width="210" style="border-right:1px solid #C0C0C0;padding:5px"><a href="../<? echo $row['user'];?>" target="_blank"><font color="#3C3E3C"><? echo $row['company'];?></font><br><font color="red"><b><? echo $row['user'];?></b></font></a></td>
100         <td align=
"left" valign="top" width="210" style="border-right:1px solid #C0C0C0;padding:5px"><? echo $row['address'];?></td>
101         <td align=
"left" valign="top" width="140" style="border-right:1px solid #C0C0C0;padding:5px"><? echo $row['phone'];?></td>
102         <td align=
"center" width="120" style="border-right:1px solid #C0C0C0;padding:5px">
103         <?
if($row['level_shop']=='0'){?>
104         <img src=
"../upload/uytin.jpg">
105         <?}
else{?>
106         Miễn phí
107         <?}?>
108             </td>
109             <td align=
"left" valign="top" width="50" style="border-right:1px solid #C0C0C0;padding:5px"><? echo $row['thutu'];?></td>
110             <td align=
"left" valign="top" width="50" style="border-right:1px solid #C0C0C0;padding:5px"><? echo $row['thutu_cat'];?></td>
111             <td align=
"center" width="100">
112     <a href=
"./?act=users_add&cat=<? echo $_REQUEST['cat']; ?>&page=<? echo $_REQUEST['page']; ?>&id=<? echo $row['id']; ?>">
113     S&#
7917;a</a> |
114     <a href=
"./?act=users&action=del&page=<? echo $_REQUEST['page']; ?>&id=<? echo $row['id']; ?>">
115     Xoá</a>
116             </td>
117         </tr>
118         </table>
119         </td></tr>
120     <?}
121     settype($total[
0],int);
122 ?>
123 </table>
124 <?
125     $s=
"index=search&act=search&keywords=$keywords&search_in_description=".$_REQUEST['search_in_description']."&cat_id=".$_REQUEST['cat_id']."&manufacturers_id=".$_REQUEST['manufacturers_id']."&pfrom=".$_REQUEST['pfrom']."&pto=".$_REQUEST['pto']."&dfrom=".$_REQUEST['dfrom']."&dto=".$REQUEST['dto'];
126 ?>
127
128 <form id=
"search1" name="search1" style="word-spacing: 0; margin: 0" method="GET" action="index.php?<? echo $s; ?>">
129 <input type=
"hidden" name="act" value="<? echo $_REQUEST['act']; ?>">
130 <input type=
"hidden" name="cat_id" value="<? echo $_REQUEST['cat_id']; ?>">
131 <input type=
"hidden" name="act" value="<? echo $_REQUEST['act']; ?>">
132 <input type=
"hidden" name="keywords" value="<? echo $_REQUEST['keywords']; ?>">
133 <input type=
"hidden" name="search_in_description" value="<? echo $_REQUEST['search_in_description']; ?>">
134 <input type=
"hidden" name="manufacturers_id" value="<? echo $_REQUEST['manufacturers_id']; ?>">
135 <input type=
"hidden" name="pfrom" value="<? echo $_REQUEST['pfrom']; ?>">
136 <input type=
"hidden" name="pto" value="<? echo $_REQUEST['pto']; ?>">
137 <input type=
"hidden" name="dfrom" value="<? echo $_REQUEST['dfrom']; ?>">
138 <input type=
"hidden" name="dto" value="<? echo $_REQUEST['dto']; ?>">
139 <input type=
"hidden" id="trang" name="p" value="1">
140 <TABLE cellSpacing=
10 cellPadding=0 width="100%" border=0 id="table35" style="line-height: 100%; text-align: justify">
141 <?
142 $pages=count_page($total[
0],$MAXPAGE);
143 echo
'<tr><td colspan="2" align="center"><hr class="fieldkey" width="100%" SIZE=1></td></tr>';
144 echo
'<tr><td class="smallfont" align="left">Trình bày <b>'.($p+1).'</b> &#273;&#7871;n <b>'.(int)($total[0]/$MAXPAGE+1).'</b> (trong <b>'.$total[0].'</b> công ty)</td>';
145 echo
'<td class="smallfont" align="right">K&#7871;t qu&#7843;: ';
146 //$param=
"act=search&keywords=$keywords&search_in_description=".$_REQUEST['search_in_description']."&categories_id=".$_REQUEST['categories_id']."&manufacturers_id=".$_REQUEST['manufacturers_id']."&pfrom=".$_REQUEST['pfrom']."&pto=".$_REQUEST['pto']."&dfrom=".$_REQUEST['dfrom']."&dto=".$REQUEST['dto'];
147 if
($p>1) echo '<a class="buton_timkiem" title="&#272;&#7847;u tiên" href="./?index=search&act&p=0">[&lt;]</a> ';
148 if
($p>0) echo '<a class="buton_timkiem" title="V&#7873; tr&#432;&#7899;c" href="./?index=search&act&p='.($p-1).'">[&lt;&lt;]</a> ';
149 $
from=($p-10>0?$p-10:0);
150 $to=($p+
10<$pages?$p+10:$pages);
151 for
($i=$from;$i<$to;$i++)
152 {
153     
//if ($i!=$p) echo '<a href="./?index=search&'.$param.'&p='.$i.'">'.($i+1).' </a>';
154     
if ($i!=$p) echo '<a class="buton_timkiem" href="./?act=search&index&p='.$i.'">'.($i+1).' </a>';
155     
else echo '<b>'.($i+1).'</b> ';
156 }

157 if
($p<$i-1) echo '<a class="buton_timkiem" title="Ti&#7871;p theo" href="./?act=search&index&p='.($p+1).'">[&gt;&gt;]</a> ';
158 if
($p<$pages-1) echo '<a class="buton_timkiem" title="Cu&#7889;i cùng" href="./?act=search&index&p='.($pages-1).'">[&gt;]</a> ';
159 echo
'</td></tr></table>';
160 ?>
161 </form>
162
163 <script>
164     function changepage(num)
165     {
166         document.all.trang.
value=num;
167         search1.submit();
168     }
169 </script>
170
171 <?
172 }

173 else

174 {
175 ?>
176 <TABLE border=
"0" cellpadding="10" cellspacing="1" width="100%" id="table1">
177 <TR><TD
class="DialogBox">
178 <FORM name=
"searchform" action="./" method="GET">
179 <table cellSpacing=
"0" cellPadding="2" width="100%" border="0" id="table2">
180     <tr>
181         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">T&#7915; khóa:</span></font></td>
182         <td
class="fieldValue" width="55%">
183         <span style=
"font-size: 8.5pt"><font size="1" face="Tahoma">
184         <input name=
"keywords" size="255" style="width: 200; height:22"></font></span></td>
185     </tr>
186     <tr>
187         <td width=
"35%" align="right">&nbsp;</td>
188         <td
class="fieldValue" width="55%">
189         <span style=
"font-size: 8.5pt"><font face="Tahoma">
190         <input type=
"checkbox" value="1" name="search_in_description"> Ch&#7881; tìm
191         trong ph&#
7847;n mô t&#7843; s&#7843;n ph&#7849;m</font></span></td>
192     </tr>
193     <tr>
194         <td width=
"35%" align="right">&nbsp;</td>
195         <td
class="fieldValue" width="55%">
196                                     <font face=
"Verdana" size="1">
197                                     <span style=
"font-size: 8.5pt">
198                                     <font face=
"Tahoma">
199                 <input type=submit
value="Tìm ki&#7871;m" class=buttonorange onmouseover="this.className='buttonblue'" onmouseout="this.className='buttonorange'"></font></span></font></td>
200     </tr>
201     <tr>
202         <td width=
"35%" align="right">&nbsp;</td>
203         <td
class="fieldValue" width="55%">&nbsp;</td>
204     </tr>
205     <tr>
206         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">Trong danh m&#7909;c:</span></font></td>
207         <td
class="fieldValue" width="55%">
208         <span style=
"font-size: 8.5pt"><font face="Tahoma">
209         <
select name="categories_id" size="1" style="width: 200">
210         <option selected
value="">[Toàn b&#7897; danh m&#7909;c]</option>
211 <?
212     $cats=GetListCategory(
17);
213     
foreach ($cats as $cat)
214     {
215         echo
'<option value="'.$cat[0].'">'.$cat[1].'</option>';
216     }
217 ?>
218         </
select></font></span></td>
219     </tr>
220     <tr>
221         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">Giá (&gt;=):</span></font></td>
222         <td
class="fieldValue" width="55%"><span style="font-size: 8.5pt">
223         <font face=
"Tahoma"><input name="pfrom"></font></span></td>
224     </tr>
225     <tr>
226         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">Giá (&lt;=):</span></font></td>
227         <td
class="fieldValue" width="55%"><span style="font-size: 8.5pt">
228         <font face=
"Tahoma"><input name="pto"></font></span></td>
229     </tr>
230     <tr>
231         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">Ngày (&gt;=):</span></font></td>
232         <td
class="fieldValue" width="55%">
233         <span style=
"font-size: 8.5pt"><font face="Tahoma">
234         <input name=
"dfrom"> (tháng/ngày/n&#259;m)</font></span></td>
235     </tr>
236     <tr>
237         <td width=
"35%" align="right"><font face="Tahoma"><span style="font-size: 8.5pt">Ngày (&lt;=):</span></font></td>
238         <td
class="fieldValue" width="55%">
239         <span style=
"font-size: 8.5pt"><font face="Tahoma">
240         <input name=
"dto"> (tháng/ngày/n&#259;m)</font></span></td>
241     </tr>
242 </table>
243
244 <input type=
"hidden" name="act" value="search">
245
246 <input type=
"hidden" name="index" value="search">
247
248 </FORM>
249     </TD></TR>
250 </TABLE>
251 <?
252 }
253 ?>



Full source code website bán hàng thương mại điện tử gần giống shopee 468.843 lượt xem

Gõ tìm kiếm nhanh...